home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Software Vault: The Gold Collection
/
Software Vault - The Gold Collection (American Databankers) (1993).ISO
/
cdr18
/
mrun210.zip
/
MRUN210C.WAS
< prev
next >
Wrap
Text File
|
1993-04-28
|
24KB
|
987 lines
;MailRun v2.10: Part C, changebbs
;1992-1993 Gerald P. Sully, all rights reserved.
#comment
**************************************************************************
**************************************************************************
*
* This file contains routines related to changing BBS settings.
* Settings are divided into three groups, each with its own
* dialog box: BBS Settings, BBS Prompts, and Mail Door Prompts.
* The appropriate routine is selected with a FLAG.
*
**************************************************************************
**************************************************************************
#endcomment
#define MRUN210C
#define MRUN210BC
#include "mrun210.h"
string ProtList, ArcList, MailDoorList, BBSTypeList
#comment
*********************************************************************
*
* MAIN()
*
* Calls checkchild(), makemaildoorlist(), menudim(),
* makebbstypelist(), makeprotlist(), changeprompts(),
* changeuserinfo(), changemaildoor()
*
* Dispatches the appropriate command based on the value
* of FLAGS.
*
*********************************************************************
#endcomment
proc main
integer cmdstatus
menudim()
checkchild()
findfirst MailRun
MailRunTrunc = $FILENAME
makeprotlist()
makebbstypelist()
makemaildoorlist()
cmdstatus = FLAGS & (USR + PRMPT + QMD)
switch cmdstatus
case USR
changeuserinfo()
endcase
case PRMPT
changeprompts()
endcase
case QMD
changemaildoor()
endcase
endswitch
endproc
#comment
*********************************************************************
*
* CHANGEUSERINFO()
*
* Called by main()
*
* Calls getbbsi(), makebbslist(), loadbbsinfo(),
* loadprompts(), loadmaildoor(), writebbsinfo(),
* writeprompts(), writemaildoor(), interfaceon(),
* bbsbox(), addbbs(), defaultsprompts(), defaultsdoor(),
* cfgprompts(), cfgmaildoor(), writenewbbs(), checkchanged(),
* getbbscoord(), gettaskstring()
*
* Puts up the BBS Information dialog box and allows the
* user to change the values for the current BBS. If the
* the DEFAULTS flag is set, changes the DEFAULT BBS
* settings. If the NEW flag is set, calls addbbs().
*
*********************************************************************
#endcomment
proc changeuserinfo
string LastBBS, LastMRun, LastBBSType
integer dialogstatus, i, j, NameChanged
i = getbbsi()
j = getitemi()
NameChanged = 0
profilerd MailRun BBS "BBSName" BBSName
LastBBS = BBS
LastMRun = MailRun
if FLAGS & DEFAULTS
BBSList = "DEFAULT"
BBS = "DEFAULT"
else
makebbslist()
endif
loadbbsinfo()
loadprompts()
loadmaildoor()
LastBBSType = BBSType
if FLAGS & DEFAULTS
findfirst MailRun
strfmt BBSName "BBS Info Defaults for %s" $FILENAME
endif
bbsbox()
interfaceon()
FLAGS &= UNCHANGED
if FLAGS & NEW
addbbs()
LastBBS = BBS
endif
while 1
dialogstatus = $DIALOG
switch dialogstatus
case 10
;User selected "Prompts"
if FLAGS & DEFAULTS
defaultsprompts()
else
cfgprompts()
endif
endcase
case 11
;User selected "Mail Door"
if FLAGS & DEFAULTS
defaultsdoor()
else
cfgmaildoor()
endif
endcase
case 12
;User selected "Save"
if NULLSTR BBSName
usermsg "You must enter the name of the BBS!"
loopwhile
elseif FLAGS & NEW
writenewbbs()
FLAGS &= OLD
endif
writebbsinfo()
writeprompts()
writemaildoor()
if NameChanged && (j == 0)
i = getbbscoord()
TaskItem = gettaskstring(i, 0)
endif
FLAGS &= UNCHANGED
endcase
case 13
;User selected "Done:
if checkchanged()
exit
endif
endcase
case 171
;User changed the BBS type
if FLAGS & DEFAULTS
if checkchanged()
loadprompts()
FLAGS &= UNCHANGED
LastBBSType = BBSType
else
BBSType = LastBBSType
endif
else
FLAGS |= DEFAULTS
loadprompts()
FLAGS &= (ALLFLAGS - DEFAULTS)
endif
FLAGS |= CHANGED
updatedlg -1
endcase
case 172
;User changed the mail door type
if FLAGS & DEFAULTS
loadmaildoor()
else
FLAGS |= DEFAULTS
loadmaildoor()
FLAGS &= (ALLFLAGS - DEFAULTS)
endif
FLAGS |= CHANGED
endcase
case 173
;User changed BBS ID with combobox
if checkchanged()
loadbbsinfo()
loadprompts()
loadmaildoor()
i = getbbscoord()
j = 0
TaskItem = gettaskstring(i, 0)
FLAGS &= UNCHANGED
LastBBS = BBS
updatedlg -1
else
BBS = LastBBS
updatedlg 512
endif
endcase
case 230
NameChanged = 1
FLAGS |= CHANGED
endcase
case 70
case 170
case 231
case 232
case 233
case 234
case 235
case 236
case 237
case 238
case 239
FLAGS |= CHANGED
endcase
endswitch
endwhile
endproc
#comment
*********************************************************************
*
* CHANGEPROMPTS()
*
* Called by main()
*
* Calls getbbsi(), makebbslist(), promptbox(), loadprompts(),
* writeprompts(), interfaceon(), defaultsbbs(), defaultsdoor(),
* cfgbbs(), cfgmaildoor(), exportprompts(), checkchanged(),
* getbbscoord(), gettaskstring()
*
* Allows the user to change the prompts for a given BBS in
* the *.MRN file. If DEFAULTS flag is set, changes default
* prompts for the current BBS type.
*
*********************************************************************
#endcomment
proc changeprompts
string LastBBS, LastMRun, LastBBSType
integer dialogstatus, i
i = getbbsi()
profilerd MailRun BBS "BBSName" BBSName
LastBBS = BBS
LastMRun = MailRun
profilerd MailRun BBS "BBSType" BBSType
if FLAGS & DEFAULTS
profilerd MailRun "DEFAULT" "BBSType" BBSType
BBSList = "DEFAULT"
BBS = "DEFAULT"
else
makebbslist()
endif
loadprompts()
LastBBSType = BBSType
promptbox()
FLAGS &= UNCHANGED
interfaceon()
while 1
dialogstatus = $DIALOG
switch dialogstatus
case 10
;User selected "BBS Info"
if FLAGS & DEFAULTS
defaultsbbs()
else
cfgbbs()
endif
endcase
case 11
;User selected "Mail Door"
if FLAGS & DEFAULTS
defaultsdoor()
else
cfgmaildoor()
endif
endcase
case 12
;User selected "Export"
exportprompts()
endcase
case 13
;User selected "Save"
writeprompts()
if !(FLAGS & DEFAULTS)
profilewr MailRun BBS "BBSType" BBSType
endif
FLAGS &= UNCHANGED
endcase
case 14
;User selected "Done"
if checkchanged()
exit
endif
endcase
case 170
;User changed BBS with the combobox
if checkchanged()
loadprompts()
profilerd MailRun BBS "BBSType" BBSType
i = getbbscoord()
TaskItem = gettaskstring(i, 0)
LastBBS = BBS
updatedlg -1
else
BBS = LastBBS
updatedlg 512
endif
endcase
case 171
;User changed BBS type
if FLAGS & DEFAULTS
if checkchanged()
loadprompts()
updatedlg 128
FLAGS &= UNCHANGED
LastBBSType = BBSType
else
BBSType = LastBBSType
updatedlg 512
endif
else
FLAGS |= DEFAULTS
loadprompts()
FLAGS &= (ALLFLAGS - DEFAULTS)
updatedlg 128
FLAGS |= CHANGED
endif
endcase
case 230
case 231
case 232
case 233
case 234
case 235
case 236
case 237
case 238
case 239
case 240
case 241
case 242
case 243
case 244
case 245
FLAGS |= CHANGED
endcase
endswitch
endwhile
endproc
#comment
*********************************************************************
*
* CHANGEMAILDOOR()
*
* Called by main()
*
* Calls getbbsi(), makebbslist(), interfaceon(),
* loadmaildoor(), writemaildoor(),
* maildoorbox(), defaultsbbs(), defaultsprompts(),
* cfgbbs(), cfgprompts(), exportmaildoor(), checkchanged(),
* getbbscoord(), gettaskstring()
*
* Allows the user to change the mail door prompts for a
* given BBS in the *.MRN file.
*
*********************************************************************
#endcomment
proc changemaildoor
string LastBBS, LastMRun, LastDoorType
integer dialogstatus, i
i = getbbsi()
profilerd MailRun BBS "BBSName" BBSName
LastBBS = BBS
LastMRun = MailRun
profilerd MailRun BBS "MailDoorType" MailDoorType
if FLAGS & DEFAULTS
profilerd MailRun "DEFAULT" "MailDoorType" MailDoorType
BBSList = "DEFAULT"
BBS = "DEFAULT"
else
makebbslist()
endif
loadmaildoor()
profilerd MailRun BBS "QWKArchiver" QWKArchiver
profilerd MailRun BBS "MailXferProt" MailXferProt
LastDoorType = MailDoorType
ArcList = "arj.exe,fpzipx.exe,lha.exe,lharc.exe,pkunzip.exe,pkxarc.exe,zoo.exe"
maildoorbox()
interfaceon()
while 1
dialogstatus = $DIALOG
switch dialogstatus
case 10
;User selected "Prompts"
if FLAGS & DEFAULTS
defaultsprompts()
else
cfgprompts()
endif
endcase
case 11
;User selected "BBS Info"
if FLAGS & DEFAULTS
defaultsbbs()
else
cfgbbs()
endif
endcase
case 12
;User selected "Export"
exportmaildoor()
endcase
case 13
;User selected "Save"
writemaildoor()
if !(FLAGS & DEFAULTS)
profilewr MailRun BBS "MailDoorType" MailDoorType
endif
profilewr MailRun BBS "QWKArchiver" QWKArchiver
profilewr MailRun BBS "MailXferProt" MailXferProt
FLAGS &= UNCHANGED
endcase
case 14
;User selected "Done"
if checkchanged()
exit
endif
endcase
case 170
;User changed mail door type
if FLAGS & DEFAULTS
if checkchanged()
loadmaildoor()
FLAGS &= UNCHANGED
updatedlg 128
LastDoorType = MailDoorType
else
MailDoorType = LastDoorType
updatedlg 512
endif
else
FLAGS |= DEFAULTS
loadmaildoor()
FLAGS &= (ALLFLAGS - DEFAULTS)
FLAGS |= CHANGED
updatedlg 128
endif
endcase
case 173
;User changed the current BBS
if checkchanged()
loadmaildoor()
profilerd MailRun BBS "MailDoorType" MailDoorType
profilerd MailRun BBS "QWKArchiver" QWKArchiver
profilerd MailRun BBS "MailXferProt" MailXferProt
i = getbbscoord()
TaskItem = gettaskstring(i, 0)
LastBBS = BBS
updatedlg -1
else
BBS = LastBBS
updatedlg 512
endif
endcase
case 171
case 172
case 230
case 231
case 232
case 233
case 234
case 235
FLAGS |= CHANGED
endcase
endswitch
endwhile
endproc
#comment
*********************************************************************
*
* ADDBBS()
*
* Called by changeuserinfo()
*
* Calls fverify(), inlist(), loadbbsinfo(), loadprompts(),
* loadmaildoor()
*
* Adds a BBS to the *.MRN file, assigning default info
* and prompts.
*
*********************************************************************
#endcomment
proc addbbs
string NewBBS
while 1
sdlginput "BBS ID" "Enter the ID of the BBS:" NewBBS
if FAILURE
exit
endif
strlwr NewBBS
if not fverify(NewBBS)
usermsg "A bulletin board's BBS ID is the same as the \
name of it's QWK packet. It must be a valid DOS \
file name without the extension."
elseif inlist(NewBBS, BBSList)
errormsg "That BBS is already in the MailRun!"
else
exitwhile
endif
endwhile
;If there is no previously existing information for the new BBS,
;assign the defaults, otherwise, use the old info.
;Any previously entered BBS will have a name.
BBS = NewBBS
profilerd MailRun BBS "BBSName" BBSName
if NULLSTR BBSName
;Load defaults
FLAGS |= DEFAULTS
loadbbsinfo()
BBSName = ""
loadprompts()
loadmaildoor()
FLAGS &= (ALLFLAGS - DEFAULTS)
else
loadbbsinfo()
loadprompts()
loadmaildoor()
endif
FLAGS |= CHANGED
;Add the new BBS to the BBS list
if not NULLSTR BBSList
strfmt BBSList "%s,%s" BBSList BBS
else
BBSList = BBS
endif
updatedlg -1
endproc
#comment
*********************************************************************
*
* EXPORTPROMPTS()
*
* Called by changeprompts()
*
* Calls findstring(), writeprompts(), makebbstypelist(),
* inlist()
*
* Creates a new BBS type with current prompt set.
*
*********************************************************************
#endcomment
proc exportprompts
string NewBBSType, BBSType_X
integer i
while 1
NewBBSType = BBSType
sdlginput "Export Prompts" "Name the new prompt set:" \
NewBBSType DEFAULT
if FAILURE
return
endif
if inlist(NewBBSType, BBSTypeList)
usermsg "There is already a prompt set for %s!" NewBBSType
loopwhile
endif
if !(findstring(NewBBSType "PCBoard") || \
findstring(NewBBSType, "WildCat") || \
findstring(NewBBSType, "Auntie") || findstring(NewBBSType, "RBBS"))
usermsg "The name of the prompt set must contain a \
keyword indicating the type of BBS. Valid keywords are `"PCBoard,`" \
`"WildCat,`" `"RBBS`" and `"Auntie.`""
loopwhile
endif
exitwhile
endwhile
i = 1
strfmt BBSType_X "BBSType_%d" i
profilerd MailRunIni "BBSTypes" BBSType_X BBSType
while not NULLSTR BBSType
i++
strfmt BBSType_X "BBSType_%d" i
profilerd MailRunIni "BBSTypes" BBSType_X BBSType
endwhile
BBSType = NewBBSType
profilewr MailRunIni "BBSTypes" BBSType_X BBSType
if FLAGS & DEFAULTS
writeprompts()
else
FLAGS |= DEFAULTS
writeprompts()
FLAGS &= (ALLFLAGS - DEFAULTS)
endif
makebbstypelist()
updatedlg 512
endproc
#comment
*********************************************************************
*
* EXPORTMAILDOOR()
*
* Called by changemaildoor()
*
* Calls writemaildoor(), makemaildoorlist(), inlist()
*
* Adds a BBS to the *.MRN file, assigning default info
* and prompts.
*
*********************************************************************
#endcomment
proc exportmaildoor
string NewMailDoorType, MailDoor_X
integer i
while 1
NewMailDoorType = MailDoorType
sdlginput "Export Prompts" "Name the new mail door:" \
NewMailDoorType DEFAULT
if FAILURE
return
endif
if inlist(NewMailDoorType, MailDoorList)
usermsg "There is already a prompt set for %s!" \
NewMailDoorType
loopwhile
endif
exitwhile
endwhile
i = 1
strfmt MailDoor_X "MailDoor_%d" i
profilerd MailRunIni "MailDoors" MailDoor_X MailDoorType
while not NULLSTR MailDoorType
i++
strfmt MailDoor_X "MailDoor_%d" i
profilerd MailRunIni "MailDoors" MailDoor_X MailDoorType
endwhile
MailDoorType = NewMailDoorType
profilewr MailRunIni "MailDoors" MailDoor_X MailDoorType
if FLAGS & DEFAULTS
writemaildoor()
else
FLAGS |= DEFAULTS
writemaildoor()
FLAGS &= (ALLFLAGS - DEFAULTS)
endif
makemaildoorlist()
updatedlg 512
endproc
#comment
*********************************************************************
*
* INLIST()
*
* Called by addbbs(), exportprompts(), exportmaildoor()
*
* Returns 1 if the first string parameter is contained in
* the second string, which must be a comma delimited list;
* otherwise returns 0.
*
*********************************************************************
#endcomment
func inlist: integer
strparm LookString, ListString
string Element
integer i = 0
strextract Element ListString "," i
while not NULLSTR Element
if strcmpi Element LookString
return 1
endif
i++
strextract Element ListString "," i
endwhile
return 0
endfunc
#comment
*********************************************************************
*
* BBSBOX()
*
* Called by changeuserinfo()
*
* Displays the BBS Information dialog box.
*
*********************************************************************
#endcomment
proc bbsbox
destroydlg
HelpPage = 5
dialogbox 24 36 320 215 15 "BBS Information" helpid HelpPage
text 142 10 40 8 right "BBS Name:"
editbox 186 8 121 12 BBSName
groupbox 10 28 138 156 "BBS Info" shadow
text 13 47 62 8 right "User ID:"
text 13 67 62 8 right "Password:"
text 13 87 62 8 right "Xfer Protocol:"
text 13 107 62 11 right "Calling From:"
text 13 127 62 8 right "User Response 1:"
text 13 147 62 8 right "User Response 2:"
text 27 167 92 8 right "Language/Prompt Scheme:"
editbox 79 45 60 12 UserName
editbox 79 65 60 12 PWord
combobox 79 85 60 42 ProtList XferProt sort
editbox 79 105 60 12 CallingFrom
editbox 79 125 60 12 UserResp1
editbox 79 145 60 12 UserResp2
editbox 123 165 16 12 LangNumber
checkbox 187 174 90 12 "Display ANSI Graphics " GraphicsOn
groupbox 158 29 150 79 "Phone Numbers" shadow
text 162 49 35 8 right "Node 1:"
text 162 69 35 8 right "Node 2:"
text 162 89 35 8 right "Node 3:"
editbox 201 47 100 12 Number_1
editbox 201 67 100 12 Number_2
editbox 201 87 100 12 Number_3
groupbox 158 115 150 50 shadow
text 160 128 39 8 right "BBS Type:"
text 171 145 39 8 right "Mail Door:"
combobox 202 124 98 42 BBSTypeList BBSType sort
combobox 214 143 76 42 MailDoorList MailDoorType sort
pushbutton 42 193 52 14 "&Prompts" normal
pushbutton 104 193 52 14 "&Mail Door" normal
pushbutton 169 193 52 14 "&Save" normal default
pushbutton 232 193 52 14 "&Done" normal
text 28 10 36 8 right "BBS ID:"
combobox 68 8 66 42 BBSList BBS sort
enddialog
endproc
#comment
*********************************************************************
*
* PROMPTBOX()
*
* Called by changeprompts()
*
* Displays the BBS Prompts dialog box.
*
*********************************************************************
#endcomment
proc promptbox
destroydlg
HelpPage = 6
dialogbox 14 36 324 209 15 "BBS Prompts" HELPID HelpPage
groupbox 13 30 297 147 shadow
text 18 44 56 8 right "Language:"
text 18 60 56 8 right "ANSI Graphics:"
text 18 76 56 8 right "Name:"
text 18 92 56 8 right "Password:"
text 18 108 56 8 right "User Prompt 1:"
text 18 124 56 8 right "User Prompt 2:"
text 18 140 56 8 right "View:"
text 18 156 56 8 right "Scan Msg Base:"
editbox 78 42 76 12 LangPrompt
editbox 78 58 76 12 GraphicsPrompt
editbox 78 74 76 12 NamePrompt
editbox 78 90 76 12 PWordPrompt
editbox 78 106 76 12 UserPrompt1
editbox 78 122 76 12 UserPrompt2
editbox 78 138 76 12 ViewPrompt
editbox 78 154 76 12 ScanPrompt
text 160 44 56 8 right "File Prompt:"
text 160 60 56 8 right "More:"
text 160 76 56 8 right "Continue:"
text 160 92 56 8 right "Command:"
text 160 108 56 8 right "File Unavailable:"
text 160 124 56 8 right "File Description:"
text 160 140 56 8 right "Start File D/L:"
text 160 156 56 8 right "Start File U/L:"
editbox 220 42 76 12 FilePrompt
editbox 220 58 76 12 MorePrompt
editbox 220 74 76 12 ContinuePrompt
editbox 220 90 76 12 CommandPrompt
editbox 220 106 76 12 DLUnavPrompt
editbox 220 122 76 12 ULDescPrompt
editbox 220 138 76 12 DLPrompt
editbox 220 154 76 12 ULPrompt
pushbutton 22 187 48 14 "&BBS Info" normal
pushbutton 80 187 48 14 "&Mail Door" normal
pushbutton 138 187 48 14 "&Export" normal
pushbutton 196 187 48 14 "&Save" normal default
pushbutton 254 187 48 14 "&Done" normal
text 12 14 42 8 right "Prompts for:"
combobox 58 12 72 42 BBSList BBS sort
text 134 14 68 8 right "Prompts based on:"
combobox 206 12 100 42 BBSTypeList BBSType sort
enddialog
endproc
#comment
*********************************************************************
*
* MAILDOORBOX()
*
* Called by changemaildoor()
*
* Displays the Mail Door dialog box.
*
*********************************************************************
#endcomment
proc maildoorbox
destroydlg
HelpPage = 7
dialogbox 8 36 342 165 15 "Mail Door" helpid HelpPage
groupbox 12 33 156 93 shadow
text 20 48 62 8 right "Start Mail Door:"
text 20 68 62 8 right "Prompts Based on:"
text 20 88 62 8 right "QWK Archiver:"
text 20 108 62 8 right "Transfer Protocol:"
editbox 86 46 70 12 MailDoor
combobox 86 66 70 42 MailDoorList MailDoorType sort
combobox 86 86 70 42 ArcList QWKArchiver sort
combobox 86 106 70 42 ProtList MailXferProt sort
groupbox 180 11 150 115 "Prompts" shadow
text 190 28 56 8 right "Message Menu:"
text 190 48 56 8 right "Mail Command:"
text 190 68 56 8 right "Receive Packet:"
text 190 88 56 8 right "Start Mail U/L:"
text 190 108 56 8 right "Start Mail D/L:"
editbox 250 25 70 12 MsgMenuPrompt
editbox 250 46 70 12 MailPrompt
editbox 250 66 70 12 ReceiveQWKPrompt
editbox 250 86 70 12 MailULPrompt
editbox 250 106 70 12 MailDLPrompt
text 19 13 53 8 right "Mail Door for:"
combobox 76 11 77 42 BBSList BBS sort
pushbutton 22 139 50 14 "&Prompts" normal
pushbutton 84 139 50 14 "&BBS Info" normal
pushbutton 146 139 50 14 "&Export" normal
pushbutton 208 139 50 14 "&Save" normal default
pushbutton 270 139 50 14 "&Done" normal
enddialog
endproc
#comment
*********************************************************************
*
* MAKEPROTLIST()
*
* Called by main()
*
* Creates a list of transfer protocols for display in the
* bbsbox() dialog box protocol combobox.
*
*********************************************************************
#endcomment
proc makeprotlist
string ProtName
integer i
i = 0
ProtList = ""
getitem PROTOCOL i ProtName
while not NULLSTR ProtName
strfmt ProtList "%s,%s" ProtList ProtName
i++
getitem PROTOCOL i ProtName
endwhile
strdelete ProtList 0 1
endproc
#comment
*********************************************************************
*
* MAKEMAILDOORLIST()
*
* Called by main(), exportmaildoor()
*
* Creates a list of mail doors for display the mail door
* combobox of the BBS info and Mail Door dialog boxes.
*
*********************************************************************
#endcomment
proc makemaildoorlist
string MailDoor_X, DoorType
integer i
MailDoorList = ""
i = 1
profilerd MailRunIni "MailDoors" "MailDoor_1" DoorType
while not NULLSTR DoorType
strfmt MailDoorList "%s,%s" MailDoorList DoorType
i++
strfmt MailDoor_X "MailDoor_%d" i
profilerd MailRunIni "MailDoors" MailDoor_X DoorType
endwhile
if i > 1
strdelete MailDoorList 0 1
endif
endproc
#comment
*********************************************************************
*
* MAKEBBSTYPELIST()
*
* Called by main(), exportprompts()
*
* Creates a list of BBS types for display the BBS type
* combobox of the BBS info and BBS prompt dialog boxes.
*
*********************************************************************
#endcomment
proc makebbstypelist
string BBSType_X, BoardType
integer i
BBSTypeList = ""
i = 1
profilerd MailRunIni "BBSTypes" "BBSType_1" BoardType
while not NULLSTR BoardType
strfmt BBSTypeList "%s,%s" BBSTypeList BoardType
i++
strfmt BBSType_X "BBSType_%d" i
profilerd MailRunIni "BBSTypes" BBSType_X BoardType
endwhile
if i > 1
strdelete BBSTypeList 0 1
endif
endproc
#comment
*********************************************************************
*
* WRITENEWBBS()
*
* Called by changeuserinfo()
*
* Calls insertbbs(), writebbs()
*
* If the NEW flag is set, writes the information for the
* new BBS to the *.MRN file.
*
*********************************************************************
#endcomment
proc writenewbbs
string char
integer i
;Determine the insertion point and renumber all following BBSs
if not NULLSTR TaskItem
strextract char TaskItem "`t" 3
;i is the BBS coordinate
atoi char i
insertbbs(i, BBS)
else
i = 0
writebbs(1, BBS)
endif
i++
strfmt TaskItem "%s`t`t`t%d`t0" BBSName i
endproc